\documentclass{article}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{fullpage}
\usepackage{pdflscape}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{spverbatim}
\usepackage{multirow}
\usepackage{bbm}
\usepackage[makeroom]{cancel}
\usepackage[margin=0.5in]{geometry}
\geometry{
 papersize={380mm,350mm}
}

\begin{document}
\title{Asylum Results}
\maketitle

The analysis contained herein will be applied to the pooled data as well as to the data by country (Germany, Austria, Switzerland, France, Italy, United Kingdom, Spain, Denmark, Sweden, Greece, Netherlands, Czech Republic, Hungary, Norway, Poland)

<<echo=FALSE,results='hide',message=FALSE>>=
library(plyr)
library(ggplot2)
library(xtable)
library(lmtest)
library(sandwich)
library(texreg)
library(grid)
library(gridExtra)
source("http://pcwww.liv.ac.uk/~william/R/crosstab.r")
svyx <- read.csv("svyx.csv")
svyz <- read.csv("svyz.csv")
@


<<echo=FALSE,results='asis',eval=FALSE>>=
print(xtable(crosstab(svyz,row.vars="lang",type="f")$crosstab,caption="N per Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")

print(xtable(crosstab(svyz,row.vars="AgeGroup",col.vars="lang",type="f")$crosstab,caption="N per Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")

print(xtable(crosstab(svyz,row.vars="AgeGroup.alt",col.vars="lang",type="f")$crosstab,caption="N per Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")

print(xtable(crosstab(svyz,row.vars="Female",col.vars="lang",type="f")$crosstab,caption="N per Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


\clearpage


The following results do not include Speeders, where Speeders are defined as all respondents who finished the survey in less than half of the median time.

<<eval=TRUE>>=
mediantime <- median(svyz$duration)
mediantime/60

N.TotalRespondents <- nrow(svyz)
N.TotalRespondents

N.Speeders <- sum((svyz$duration < mediantime/2) == TRUE)
N.Speeders

svyx <- subset(svyx,svyx$duration > mediantime/2)
svyz <- subset(svyz,svyz$duration > mediantime/2)

@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="lang",type="f")$crosstab,caption="N per Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage

\section{Conjoint Results and Plots}


<<echo=FALSE,results='hide'>>=


svyxr <- subset(svyx,svyx$mix == "A")

cutoff <- 4
count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)
CRP4 <- (count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)/nrow(svyxr))[2,2]


cutoff <- 3
count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)
CRP3 <- (count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)/nrow(svyxr))[2,2]

cutoff <- 2
count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)
CRP2 <- (count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)/nrow(svyxr))[2,2]

cutoff <- 1
count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)
CRP1 <- (count(svyxr$rateA <= cutoff & svyxr$rateB <= cutoff & svyxr$rateC <= cutoff & svyxr$rateD <= cutoff & svyxr$rateE <= cutoff & 
        svyxr$rateF <= cutoff & svyxr$rateG <= cutoff & svyxr$rateH <= cutoff & svyxr$rateI <= cutoff & svyxr$rateJ <= cutoff)/nrow(svyxr))[2,2]




cutoff <- 4
count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)
CAP4 <- (count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)/nrow(svyxr))[2,2]

cutoff <- 5
count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)
CAP5 <- (count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)/nrow(svyxr))[2,2]

cutoff <- 6
count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)
CAP6 <- (count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)/nrow(svyxr))[2,2]

cutoff <- 7
count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)
CAP7 <- (count(svyxr$rateA >= cutoff & svyxr$rateB >= cutoff & svyxr$rateC >= cutoff & svyxr$rateD >= cutoff & svyxr$rateE >= cutoff & 
        svyxr$rateF >= cutoff & svyxr$rateG >= cutoff & svyxr$rateH >= cutoff & svyxr$rateI >= cutoff & svyxr$rateJ >= cutoff)/nrow(svyxr))[2,2]


@



<<echo=FALSE,results='hide'>>=

RatingThreshold <- c(4,3,2,1)
ProportionCategoricalReject <- c(CRP4,CRP3,CRP2,CRP1)
CatRej <- data.frame(RatingThreshold,ProportionCategoricalReject)

@

<<echo=FALSE,results='asis'>>=
print(xtable(CatRej,caption="Proportion who Categorically Reject All Asylum-Seekers, by Rating Threshold",digits = c(0,0,2)),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)
@


<<echo=FALSE,results='hide'>>=
RatingThreshold <- c(4,5,6,7)
ProportionCategoricalAccept <- c(CAP4,CAP5,CAP6,CAP7)
CatAcc <- data.frame(RatingThreshold,ProportionCategoricalAccept)
@

<<echo=FALSE,results='asis'>>=
print(xtable(CatAcc,caption="Proportion who Categorically Accept All Asylum-Seekers, by Rating Threshold",digits = c(0,0,2)),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)
@


<<echo=FALSE,results='asis',eval=FALSE>>=
print(xtable(CatAcc,caption="Proportion who Categorically Accept All Asylum-Seekers, by Rating Threshold",digits = c(0,0,2)),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)

print(xtable(crosstab(svyz,row.vars="CatRejecter",col.vars="lang",type="c")$crosstab,caption="Employment Status",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


\clearpage


<<echo=FALSE>>=
vcovCluster <- function(
  model,
  cluster
)
{
  require(sandwich)
  require(lmtest)
  if(nrow(model.matrix(model))!=length(cluster)){
    stop("check your data: cluster variable has different N than model")
  }
  M <- length(unique(cluster))
  N <- length(cluster)           
  K <- model$rank   
  if(M<50){
    warning("Fewer than 50 clusters, variances may be unreliable (could try block bootstrap instead).")
  }
  dfc <- (M/(M - 1)) * ((N - 1)/(N - K))
  uj  <- apply(estfun(model), 2, function(x) tapply(x, cluster, sum));
  rcse.cov <- dfc * sandwich(model, meat = crossprod(uj)/N)
  return(rcse.cov)
}


#############
#PRELIMINARY#
#############

#Load framework csv with no values yet
d <- read.csv("eff_plot_starter.csv")

#Load plotting function
plotit <- function(d){  
  
  CIs <- function(d){
    colnames(d)[1:2] <- c("pe","se")
    d$upper <-d$pe + 1.96*d$se
    d$lower <-d$pe - 1.96*d$se
    return(d)
  }
  d<- CIs(d)
  
  
  
  yylab  <- c("Change in Pr(Support Allowing to Stay)")
  
  p = ggplot(d,aes(y=pe,x=order,group=highlight,color=group,shape=highlight,size=1.5)) + geom_point()
  p = p + coord_flip(ylim = c(-.3, .3))  
  p = p + geom_hline(yintercept = 0,size=.5,colour="blue",linetype=1) 
  p = p +geom_pointrange(aes(ymin=lower,ymax=upper,width=.4),position="dodge",size=.6)
  p = p + scale_y_continuous(name=yylab,breaks=round(seq(-.3,.3,.1),1),labels=c("-.3","-.2","-.1","0",".1",".2",".3"))
  p = p + scale_colour_discrete("Attribute:") + scale_x_discrete(name="",
                                                                 labels=c("     Speaks no (National Language)","     Speaks broken (National Language)","     Speaks fluent (National Language)","LANGUAGE SKILLS:"," ",
                                                                          "     Muslim","     Christian","     Agnostic","RELIGION:"," ",
                                                                          "     Seeking better economic opportunities","     Persecution for ethnicity","     Persecution for religious beliefs","     Persecution for political views","REASON FOR MIGRATING:"," ",
                                                                          "     Physically handicapped","     No surviving family members","     Victim of torture","     Post-traumatic stress disorder (PTSD)","     None","VULNERABILITY:"," ",
                                                                          "     Doctor","     Teacher","     Accountant","     Farmer", "     Cleaner","     Unemployed","PREVIOUS OCCUPATION:"," ",
                                                                          "     62 Years", "     38 Years","     21 Years","AGE:"," ",
                                                                          "     Iraq","     Ukraine","     Pakistan","     Eritrea", "     Kosovo","     Afghanistan","     Syria","COUNTRY OF ORIGIN:"," ",
                                                                          "     Male","     Female","GENDER:"," ",
                                                                          "     Major Inconsistencies", "     Minor Inconsistencies","     No Inconsistencies","CONSISTENCY OF ASYLUM TESTIMONY:")) + scale_colour_manual(values = c("cornflowerblue","coral4","gray20","cornflowerblue","coral4","gray20","cornflowerblue","coral4","gray20","red"))
  
  
  theme_bw1 <- function(base_size = 13, base_family = "") {
    theme_grey(base_size = base_size, base_family = base_family) %+replace%
      theme(
        axis.text.x =       element_text(size = base_size, colour = "black",  hjust = .5 , vjust=1),
        axis.text.y =       element_text(size = base_size , colour = "black", hjust = 0 , vjust=.5 ), # changes position of X axis text
        axis.ticks =        element_line(colour = "grey50"),
        axis.title.y =      element_text(size = base_size,angle=90,vjust=.01,hjust=.1),
        legend.position = "none"
      )
  }
  
  p = p + theme_bw1() 
  p = p + ggtitle("") + theme(plot.title = element_text(lineheight=.8, face="bold", vjust=1.5))
  
  return(p)
  
}




plotit2 <- function(d){  
  
  CIs <- function(d){
    colnames(d)[1:2] <- c("pe","se")
    d$upper <-d$pe + 1.96*d$se
    d$lower <-d$pe - 1.96*d$se
    return(d)
  }
  d<- CIs(d)
  
  
  
  yylab  <- c("Change in Rating Level")
  
  p = ggplot(d,aes(y=pe,x=order,group=highlight,color=group,shape=highlight,size=1.5)) + geom_point()
  p = p + coord_flip(ylim = c(-1.5, 1.5))  
  p = p + geom_hline(yintercept = 0,size=.5,colour="blue",linetype=1) 
  p = p +geom_pointrange(aes(ymin=lower,ymax=upper,width=.4),position="dodge",size=.6)
  p = p + scale_y_continuous(name=yylab,breaks=round(seq(-1.5,1.5,.5),1),labels=c("-1.5","-1.0","-.5","0",".5","1.0","1.5"))
  p = p + scale_colour_discrete("Attribute:") + scale_x_discrete(name="",
                                                                 labels=c("     Speaks no (National Language)","     Speaks broken (National Language)","     Speaks fluent (National Language)","LANGUAGE SKILLS:"," ",
                                                                          "     Muslim","     Christian","     Agnostic","RELIGION:"," ",
                                                                          "     Seeking better economic opportunities","     Persecution for ethnicity","     Persecution for religious beliefs","     Persecution for political views","REASON FOR MIGRATING:"," ",
                                                                          "     Physically handicapped","     No surviving family members","     Victim of torture","     Post-traumatic stress disorder (PTSD)","     None","VULNERABILITY:"," ",
                                                                          "     Doctor","     Teacher","     Accountant","     Farmer", "     Cleaner","     Unemployed","PREVIOUS OCCUPATION:"," ",
                                                                          "     62 Years", "     38 Years","     21 Years","AGE:"," ",
                                                                          "     Iraq","     Ukraine","     Pakistan","     Eritrea", "     Kosovo","     Afghanistan","     Syria","COUNTRY OF ORIGIN:"," ",
                                                                          "     Male","     Female","GENDER:"," ",
                                                                          "     Major Inconsistencies", "     Minor Inconsistencies","     No Inconsistencies","CONSISTENCY OF ASYLUM TESTIMONY:")) + scale_colour_manual(values = c("cornflowerblue","coral4","gray20","cornflowerblue","coral4","gray20","cornflowerblue","coral4","gray20","red"))
  
  
  theme_bw1 <- function(base_size = 13, base_family = "") {
    theme_grey(base_size = base_size, base_family = base_family) %+replace%
      theme(
        axis.text.x =       element_text(size = base_size, colour = "black",  hjust = .5 , vjust=1),
        axis.text.y =       element_text(size = base_size , colour = "black", hjust = 0 , vjust=.5 ), # changes position of X axis text
        axis.ticks =        element_line(colour = "grey50"),
        axis.title.y =      element_text(size = base_size,angle=90,vjust=.01,hjust=.1),
        legend.position = "none"
      )
  }
  
  p = p + theme_bw1() 
  p = p + ggtitle("") + theme(plot.title = element_text(lineheight=.8, face="bold", vjust=1.5))
  
  return(p)
  
}



##########################################
##########################################
#RUNNING REGRESSIONS AND PLOTTING EFFECTS#
##########################################
##########################################

svyx$cconsist <- factor(svyx$cconsist)
svyx$cgender <- factor(svyx$cgender)
svyx$corigin <- factor(svyx$corigin)
svyx$cage <- factor(svyx$cage)
svyx$cjob <- factor(svyx$cjob)
svyx$cvulner <- factor(svyx$cvulner)
svyx$creason <- factor(svyx$creason)
svyx$creligion <- factor(svyx$creligion)
svyx$clang <- factor(svyx$clang)

constructit <- function(data, DV = "pref", title){
  
  if (DV == "pref"){
    data$depvar <- data$pref
  }
  
  if (DV == "rate"){
    data$depvar <- data$rate
  }
  
  if (DV == "ratebin"){
    data$depvar <- data$ratebin
  }
  
  model <- lm(depvar ~ cconsist + cgender + corigin + cage + cjob + cvulner + creason + creligion + clang, data = data)
  
  #Extract pe and se estimates
  output <- coeftest(model,vcov = vcovCluster(model, factor(data$id)))
  pevec <- output[,1]
  sevec <- output[,2]
  
  #Input the estimates into the framework dataframe
  for (i in 1:27){
    d$pe[d$code == i] <- pevec[i+1]
    # +1 because of intercept
    d$se[d$code == i] <- sevec[i+1]
  }
  
  #PLOT IT!!!

  if (DV == "pref"){
    theplot <- plotit(d) + ggtitle(title)
  }
  
  if (DV == "ratebin"){
    theplot <- plotit(d) + ggtitle(title)
  }
  
  if (DV == "rate"){
    theplot <- plotit2(d) + ggtitle(title)
  }
  
  return(theplot)
  
}





constructit2 <- function(data, DV = "pref", title, subset){
  
  if (DV == "pref"){
    data$depvar <- data$pref
  }
  
  if (DV == "rate"){
    data$depvar <- data$rate
  }
  
  if (DV == "ratebin"){
    data$depvar <- data$ratebin
  }
  
  data$subset <- subset
  
  data0 <- subset(data,data$subset == 0)
  data1 <- subset(data,data$subset == 1)
  
  #Model 0 (i.e. subset = 0)
  
  model0 <- lm(depvar ~ cconsist + cgender + corigin + cage + cjob + 
                 cvulner + creason + creligion + clang, data = data0)
  
  #Extract pe and se estimates
  output <- coeftest(model0,vcov = vcovCluster(model0, factor(data0$id)))
  pevec <- output[,1]
  sevec <- output[,2]
  
  d0 <- d
  #Input the estimates into the framework dataframe
  for (i in 1:27){
    d0$pe[d$code == i] <- pevec[i+1]
    # +1 because of intercept
    d0$se[d$code == i] <- sevec[i+1]
  }
  
  d0$subset <- 0
  
  #Now model 1
  
  model1 <- lm(depvar ~ cconsist + cgender + corigin + cage + cjob + 
                 cvulner + creason + creligion + clang, data = data1)
  
  #Extract pe and se estimates
  output <- coeftest(model1,vcov = vcovCluster(model1, factor(data1$id)))
  pevec <- output[,1]
  sevec <- output[,2]
  
  d1 <- d
  #Input the estimates into the framework dataframe
  for (i in 1:27){
    d1$pe[d$code == i] <- pevec[i+1]
    # +1 because of intercept
    d1$se[d$code == i] <- sevec[i+1]
  }
  
  d1$subset <- 1
  
  fulld <- rbind(d0,d1)
  #PLOT IT!!!
  
  if (DV == "pref"){
    theplot <- plotit(fulld) + ggtitle(title) + facet_grid(. ~ subset)
  }
  
  if (DV == "ratebin"){
    theplot <- plotit(fulld) + ggtitle(title) + facet_grid(. ~ subset)
  }
  
  if (DV == "rate"){
    theplot <- plotit2(fulld) + ggtitle(title) + facet_grid(. ~ subset)
  }
  
  return(theplot)
  
}




@

<<echo=FALSE,results='hide'>>=

#Import svyz variables into svyx to create subset plots

svyx$HighEmpathy <- rep(svyz$HighEmpathy, each = 10)
svyx$ProEU <- rep(svyz$ProEU, each = 10)

svyx$HighCosmo <- rep(svyz$HighCosmo, each = 10)
svyx$HighNationalism <- rep(svyz$HighNationalism, each = 10)

svyx$HighKnowledge <- rep(svyz$HighKnowledge, each = 10)
svyx$HighInterest <- rep(svyz$HighInterest, each = 10)

svyx$Altruism <- rep(svyz$Altruism, each = 10)
svyx$Female <- rep(svyz$Female, each = 10)
svyx$OldAge <- rep(svyz$OldAge, each = 10)

svyx$L <- rep(svyz$L, each = 10)
svyx$C <- rep(svyz$C, each = 10)
svyx$R <- rep(svyz$R, each = 10)

@

<<warning=FALSE,results='hide',message=FALSE,echo=FALSE>>=

#Kill strange NAs
svyp <- subset(svyx,svyx$cconsist != "<NA>")
@

\clearpage

<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(svyp,DV="rate",title = "Rating (Pooled)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(svyp,DV="ratebin",title = "Binary Rating (Pooled)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(svyp,DV="pref",title = "Forced Choice (Pooled)")
@


\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$L==1),DV="pref",title = "Forced Choice \n Left of Center (Pooled)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$C==1),DV="pref",title = "Forced Choice \n Center (Pooled)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$R==1),DV="pref",title = "Forced Choice \n Right of Center (Pooled)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Low (0) vs. High (1) Empathy (Pooled)",
             subset=svyp$HighEmpathy)
@


\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Not Altruistic (0) vs. Altruistic (1) (Pooled)",
             subset=svyp$Altruism)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Low (0) vs. High (1) Cosmopolitanism (Pooled)",
             subset=svyp$HighCosmo)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Low (0) vs. High (1) Nationalism (Pooled)",
             subset=svyp$HighNationalism)
@

\clearpage

<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Low (0) vs. High (1) Political Interest (Pooled)",
             subset=svyp$HighInterest)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12,eval=FALSE>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Low (0) vs. High (1) Knowledge (Pooled)",subset=svyp$HighKnowledge)
@

\clearpage

<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Anti (0) vs. Pro (1) EU (Pooled)",
             subset=svyp$ProEU)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Male (0) vs. Female (1) (Pooled)",
             subset=svyp$Female)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=11,fig.height=12>>=
constructit2(svyp,DV="pref",title = "Forced Choice \n Young (0) vs. Old (1) (Pooled)",
             subset=svyp$OldAge)
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="EN"),DV="pref",title = "Forced Choice (United Kingdom)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="DE"),DV="pref",title = "Forced Choice (Germany)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="FR"),DV="pref",title = "Forced Choice (France)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="IT"),DV="pref",title = "Forced Choice (Italy)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="ES"),DV="pref",title = "Forced Choice (Spain)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="DA"),DV="pref",title = "Forced Choice (Denmark)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="SV"),DV="pref",title = "Forced Choice (Sweden)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="EL"),DV="pref",title = "Forced Choice (Greece)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="NL"),DV="pref",title = "Forced Choice (Netherlands)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="CS"),DV="pref",title = "Forced Choice (Czech Republic)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="HU"),DV="pref",title = "Forced Choice (Hungary)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="DE-CH" | svyp$lang=="FR-CH"),DV="pref",title = "Forced Choice (Switzerland)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="DE-AT"),DV="pref",title = "Forced Choice (Austria)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="NO"),DV="pref",title = "Forced Choice (Norway)")
@

\clearpage


<<warning=FALSE,results='hide',message=FALSE,echo=FALSE,fig.width=8,fig.height=9>>=
constructit(subset(svyp,svyp$lang=="PL"),DV="pref",title = "Forced Choice (Poland)")
@

\clearpage

\section{Tables and Crosstabs}


<<echo=FALSE,results='hide'>>=
mean(svyz$duration)/60
median(svyz$duration)/60
@

<<echo=FALSE,results='hide'>>=
count(svyz$SharePref)
crosstab(svyz,row.vars="SharePref",col.vars="shares1",type="c")
crosstab(svyz,row.vars="SharePref",col.vars="info1",type="c")

mean(svyz$ShareFErank)
mean(svyz$ShareSFArank)
mean(svyz$SharePrank)

var(svyz$ShareFErank)
var(svyz$ShareSFArank)
var(svyz$SharePrank)

count(svyz$ShareFErank)
count(svyz$ShareSFArank)
count(svyz$SharePrank)

rankA1 <- c(1,2,3)
first.entry <- count(svyz$ShareFErank[!is.na(svyz$ShareFErank)])[,2]
same.for.all <- count(svyz$ShareSFArank[!is.na(svyz$ShareSFArank)])[,2]
proportional <- count(svyz$SharePrank[!is.na(svyz$SharePrank)])[,2]
@

<<echo=FALSE,results='hide'>>=
xtable(data.frame(rankA1,first.entry,same.for.all,proportional),digits=0)
@


<<echo=FALSE,results='hide'>>=
count(svyz$AssignPref)
crosstab(svyz,row.vars="AssignPref",col.vars="info2",type="c")
@

<<echo=FALSE,results='hide'>>=
#Importance of (higher is more important): 
#personal/family, ethnic, economic, preferences, language
mean(svyz$MatchFam,na.rm=T)
mean(svyz$MatchEth,na.rm=T)
mean(svyz$MatchEcon,na.rm=T)
mean(svyz$MatchPP,na.rm=T)
mean(svyz$MatchLang,na.rm=T)

count(svyz$MatchFam)
count(svyz$MatchEth)
count(svyz$MatchEcon)
count(svyz$MatchPP)
count(svyz$MatchLang)

importance.b <- c(-2,-1,0,1,2,NA)
personal.family.b <- count(svyz$MatchFam)[,2]
ethnic.b <- count(svyz$MatchEth)[,2]
economic.b <- count(svyz$MatchEcon)[,2]
personal.preferences.b <- count(svyz$MatchPP)[,2]
language.b <- count(svyz$MatchLang)[,2]
@

<<echo=FALSE,results='hide'>>=
xtable(data.frame(importance.b,personal.family.b,ethnic.b,economic.b,personal.preferences.b,language.b)[1:5],digits=0)
@


<<echo=FALSE,results='hide'>>=
#Rank of (lower is more important): 
#personal/family, ethnic, economic, preferences, language
mean(svyz$rMatchFam,na.rm=T)
mean(svyz$rMatchEth,na.rm=T)
mean(svyz$rMatchEcon,na.rm=T)
mean(svyz$rMatchPP,na.rm=T)
mean(svyz$rMatchLang,na.rm=T)

count(svyz$rMatchFam)
count(svyz$rMatchEth)
count(svyz$rMatchEcon)
count(svyz$rMatchPP)
count(svyz$rMatchLang)

var(svyz$rMatchFam,na.rm=T)
var(svyz$rMatchEth,na.rm=T)
var(svyz$rMatchEcon,na.rm=T)
var(svyz$rMatchPP,na.rm=T)
var(svyz$rMatchLang,na.rm=T)
@


<<echo=FALSE,results='hide'>>=
rank.c <- c(1,2,3,4,5,NA)
personal.family.c <- count(svyz$rMatchFam)[,2]
ethnic.c <- count(svyz$rMatchEth)[,2]
economic.c <- count(svyz$rMatchEcon)[,2]
personal.preferences.c <- count(svyz$rMatchPP)[,2]
language.c <- count(svyz$rMatchLang)[,2]
@

<<echo=FALSE,results='hide'>>=
xtable(data.frame(rank.c,personal.family.c,ethnic.c,economic.c,personal.preferences.c,language.c)[1:5,],digits=0)
@



<<echo=FALSE,results='hide'>>=
count(svyz$AsyLocate)
crosstab(svyz,row.vars="AsyLocate",col.vars="info3",type="c")
count(svyz$AsyCent[!is.na(svyz$AsyCent)])
count(svyz$AsyDecent[!is.na(svyz$AsyDecent)])
@


<<echo=FALSE,results='hide'>>=
count(svyz$Harmonize)
crosstab(svyz,row.vars="Harmonize",col.vars="info4",type="c")
@


<<echo=FALSE,results='hide'>>=
mean(svyz$RB1)
crosstab(svyz,row.vars="RB1",col.vars="info6",type="c")
mean(svyz$RB2)
crosstab(svyz,row.vars="RB2",col.vars="info6",type="c")
mean(svyz$RB3)
crosstab(svyz,row.vars="RB3",col.vars="info6",type="c")
mean(svyz$RB4)
crosstab(svyz,row.vars="RB4",col.vars="info6",type="c")
mean(svyz$RB5)
crosstab(svyz,row.vars="RB5",col.vars="info6",type="c")
mean(svyz$RB6)
crosstab(svyz,row.vars="RB6",col.vars="info6",type="c")
mean(svyz$RB7)
crosstab(svyz,row.vars="RB7",col.vars="info6",type="c")
mean(svyz$RB8)
crosstab(svyz,row.vars="RB8",col.vars="info6",type="c")
mean(svyz$RB9)
crosstab(svyz,row.vars="RB9",col.vars="info6",type="c")
mean(svyz$RB10)
crosstab(svyz,row.vars="RB10",col.vars="info6",type="c")
mean(svyz$RB11)
crosstab(svyz,row.vars="RB11",col.vars="info6",type="c")
@

<<echo=FALSE,results='hide'>>=
#indoor housing, maximum occupants, remain with family, right to work, language training, education,
#health system, welfare, relocation rights, info in native language, legal assistance
importance.6 <- c(-2,-1,0,1,2)
indoor.housing <- count(svyz$RB1)[,2]
occupants.max <- count(svyz$RB2)[,2]
remain.family <- count(svyz$RB3)[,2]
right.to.work <- count(svyz$RB4)[,2]
language.training <- count(svyz$RB5)[,2]
education.opp <- count(svyz$RB6)[,2]
health.benefits <- count(svyz$RB7)[,2]
welfare.plus <- count(svyz$RB8)[,2]
right.to.relocate <- count(svyz$RB9)[,2]
info.native.lang <- count(svyz$RB10)[,2]
free.legal.help <- count(svyz$RB11)[,2]

@

<<echo=FALSE,results='hide'>>=
xtable(data.frame(importance.6,indoor.housing,occupants.max,remain.family,right.to.work,language.training,
           education.opp,health.benefits,welfare.plus,right.to.relocate,info.native.lang,free.legal.help),digits=0)
@




<<echo=FALSE,results='hide'>>=
count(svyz$StipendLevel)
crosstab(svyz,row.vars="StipendLevel",col.vars="info7",type="c")
@


<<echo=FALSE,results='hide'>>=
count(svyz$AsylumEurope)
crosstab(svyz,row.vars="AsylumEurope",col.vars="info9",type="c")
mean(svyz$AsylumEurope)
@

<<echo=FALSE,results='hide'>>=
count(svyz$AsylumHome)
crosstab(svyz,row.vars="AsylumHome",col.vars="info10",type="c")
mean(svyz$AsylumHome)
@

<<echo=FALSE,results='hide'>>=
delta <- c("greatly decrease","decrease","no change","increase","greatly increase")
European.Asylum <- count(svyz$AsylumEurope)[,2]
National.Asylum <- count(svyz$AsylumHome)[,2]
data.frame(delta,European.Asylum,National.Asylum)
@

<<echo=FALSE,results='hide'>>=
count(svyz$Schengen)
count(svyz$NonSchengen)
count(svyz$Immigration)
@



<<eval=FALSE,echo=FALSE,results='hide'>>=
#OTHER STUFF

fit1 <- factanal(data.frame(svy$QQM1,svy$QQM2,svy$QQM3,svy$QQM4,svy$QQM5,svy$QQM6), 2, rotation="varimax")
print(fit1, digits=2, cutoff=.3, sort=FALSE)

fit2 <- factanal(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4,svy$QQN1,svy$QQN2,svy$QQN3,svy$QQN4), 2, rotation="varimax")
print(fit2, digits=2, cutoff=.3, sort=FALSE)
fit2 <- factanal(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4,svy$QQN1,svy$QQN2,svy$QQN3,svy$QQN4), 3, rotation="varimax")
print(fit2, digits=2, cutoff=.3, sort=FALSE)
fit2 <- factanal(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4,svy$QQN1,svy$QQN2,svy$QQN3,svy$QQN4), 4, rotation="varimax")
print(fit2, digits=2, cutoff=.3, sort=FALSE)



library(psych)


alpha(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4,-svy$QQN4))
alpha(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4))
alpha(data.frame(svy$QQC2,svy$QQC3,svy$QQC4,-svy$QQN4))
alpha(data.frame(svy$QQC2,svy$QQC3,svy$QQC4))


alpha(data.frame(svy$QQN1,svy$QQN2,svy$QQN3,svy$QQN4))
alpha(data.frame(svy$QQN1,svy$QQN2,svy$QQN3))
alpha(data.frame(svy$QQN1,svy$QQN2))

alpha(data.frame(svy$QQC1,svy$QQC2,svy$QQC3,svy$QQC4,svy$QQC5,-svy$QQN1,-svy$QQN2,-svy$QQN3))

alpha(data.frame(svy$QQM1,svy$QQM2,svy$QQM3,svy$QQM4,svy$QQM5,svy$QQM6))
alpha(data.frame(svy$QQM1,svy$QQM3,svy$QQM5))
alpha(data.frame(svy$QQM2,svy$QQM4,svy$QQM6))
@


<<>>=
mean(svyz$duration)/60
median(svyz$duration)/60
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="SharePref",col.vars="shares1",type="c")$crosstab,caption="Preference regarding International Allocation, by Given Numbers of Asylum-Seekers Implicated or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(subset(svyz,svyz$shares1==0),row.vars="SharePref",col.vars="lang",type="c")$crosstab,caption="Preference regarding International Allocation, by Country (NOT Given Numbers of Asylum-Seekers Implicated)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(subset(svyz,svyz$shares1==1),row.vars="SharePref",col.vars="lang",type="c")$crosstab,caption="Preference regarding International Allocation, by Country (YES Given Numbers of Asylum-Seekers Implicated)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="SharePref",col.vars="info1",type="c")$crosstab,caption="Preference regarding International Allocation, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(data.frame(rank=rankA1,first.entry=first.entry*100/nrow(svyz),same.for.all=same.for.all*100/nrow(svyz),proportional=proportional*100/nrow(svyz)),caption="Percentage Each Option was Ranked at Each Level (Pooled)",digits = 0),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)
@

\clearpage

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AssignPref",col.vars="info2",type="c")$crosstab,caption="Preference regarding Method of Allocation, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AssignPref",col.vars="lang",type="c")$crosstab,caption="Preference regarding Method of Allocation, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage

<<echo=FALSE,results='asis'>>=
print(xtable(data.frame(importance=importance.b,family=personal.family.b*100/sum(!is.na(svyz$MatchFam)),ethnic=ethnic.b*100/sum(!is.na(svyz$MatchFam)),economic=economic.b*100/sum(!is.na(svyz$MatchFam)),
                        personal.pref=personal.preferences.b*100/sum(!is.na(svyz$MatchFam)),language=language.b*100/sum(!is.na(svyz$MatchFam)))[1:5,],caption="Level of Importance Attached to Each Matching Criterion (Pooled)",digits = 0),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)
@


<<echo=FALSE,results='asis'>>=
print(xtable(data.frame(rank=rank.c,family=personal.family.c*100/sum(!is.na(svyz$rMatchFam)),ethnic=ethnic.c*100/sum(!is.na(svyz$rMatchFam)),economic=economic.c*100/sum(!is.na(svyz$rMatchFam)),
                        personal.pref=personal.preferences.c*100/sum(!is.na(svyz$rMatchFam)),language=language.c*100/sum(!is.na(svyz$rMatchFam)))[1:5,],caption="Number of Times Each Matching Criterion was Ranked at Each Level (Pooled)",digits = 0),caption.placement = "top",floating=TRUE,table.placement = "h!",include.rownames=FALSE)
@

\clearpage
<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsyLocate",col.vars="info3",type="c")$crosstab,caption="Preference regarding (De)Centralization of Asylum-Seekers, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsyLocate",col.vars="lang",type="c")$crosstab,caption="Preference regarding (De)Centralization of Asylum-Seekers, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsyCent",col.vars="lang",type="c")$crosstab,caption="Preference regarding Urban vs. Rural Placement, Given Centralization of Asylum-Seekers, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsyDecent",col.vars="lang",type="c")$crosstab,caption="Preference regarding National Allocation, Given Decentralization of Asylum-Seekers, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Harmonize",col.vars="info4",type="c")$crosstab,caption="Preference regarding Harmonization of Asylum Rules and Standards, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Harmonize",col.vars="lang",type="c")$crosstab,caption="Preference regarding Harmonization of Asylum Rules and Standards, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage
<<echo=FALSE,results='asis'>>=
print(xtable(t(data.frame(importance=importance.6,indoor.housing=indoor.housing*100/nrow(svyz),occupants.max=occupants.max*100/nrow(svyz),
                        remain.family=remain.family*100/nrow(svyz),right.to.work=right.to.work*100/nrow(svyz),language.training=language.training*100/nrow(svyz),
                        education.opp=education.opp*100/nrow(svyz),health.benefits=health.benefits*100/nrow(svyz),welfare.plus=welfare.plus*100/nrow(svyz),
                        right.to.relocate=right.to.relocate*100/nrow(svyz),info.native.lang=info.native.lang*100/nrow(svyz),free.legal.help=free.legal.help*100/nrow(svyz))),
             caption="Level of Importance Attached to Right/Benefit During Waiting Period (Pooled)",digits = 0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@
\clearpage

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="StipendLevel",col.vars="info7",type="c")$crosstab,caption="Preference regarding Stipend Given to Asylum-Seekers, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="StipendLevel",col.vars="lang",type="c")$crosstab,caption="Preference regarding Stipend Given to Asylum-Seekers, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsylumEurope",col.vars="info9",type="c")$crosstab,caption="Preference to Decrease (negative) vs. Increase (positive) Number Granted Asylum in EUROPE, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsylumEurope",col.vars="lang",type="c")$crosstab,caption="Preference to Decrease (negative) vs. Increase (positive) Number Granted Asylum in EUROPE, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsylumHome",col.vars="info10",type="c")$crosstab,caption="Preference to Decrease (negative) vs. Increase (positive) Number Granted Asylum in HOME COUNTRY, by Given Additional Info or Not (Pooled)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AsylumHome",col.vars="lang",type="c")$crosstab,caption="Preference to Decrease (negative) vs. Increase (positive) Number Granted Asylum in HOME COUNTRY, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Schengen",col.vars="lang",type="c")$crosstab,caption="Preference for Border Controls (1), Schengen Countries",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


\clearpage
<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="NonSchengen",col.vars="lang",type="c")$crosstab,caption="Preference for Border Controls (1), Non-Schengen Countries (UK)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Immigration",col.vars="lang",type="c")$crosstab,caption="Preference to Decrease (negative) vs. Increase (positive) Immigration in HOME COUNTRY, by Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="HomeBorn",col.vars="lang",type="c")$crosstab,caption="Born in Home Country",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Female",col.vars="lang",type="c")$crosstab,caption="Female",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="AgeGroup",col.vars="lang",type="c")$crosstab,caption="Age Group",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="EmpStatus",col.vars="lang",type="c")$crosstab,caption="Employment Status",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="PartyID",col.vars="lang",type="c")$crosstab,caption="Party ID Code Number",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Ideo5",col.vars="lang",type="c")$crosstab,caption="Political Ideology",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage
<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Screener",col.vars="lang",type="c")$crosstab,caption="Screener Correct",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="EducUncoded",col.vars="lang",type="c")$crosstab,caption="Education (Uncoded - Just Checking for Variation)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

<<echo=FALSE,results='asis',eval=FALSE>>=
print(xtable(crosstab(svyz,row.vars="EducISCED",col.vars="lang",type="c")$crosstab,caption="Education Level (ISCED 2011)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis',eval=FALSE>>=
print(xtable(crosstab(svyz,row.vars="Educ4",col.vars="lang",type="c")$crosstab,caption="Education Level (Simplified)",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="IncomeDecile",col.vars="lang",type="c")$crosstab,caption="Income Decile",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="EUAttitude",col.vars="lang",type="c")$crosstab,caption="Attitude toward EU",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Empathy1",col.vars="lang",type="c")$crosstab,caption="Empathy Index Construct 1",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@

\clearpage
<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Empathy2",col.vars="lang",type="c")$crosstab,caption="Empathy Index Construct 2",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Empathy",col.vars="lang",type="c")$crosstab,caption="Full Empathy Index",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Cosmo",col.vars="lang",type="c")$crosstab,caption="Cosmopolitanism Index",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Nationalism",col.vars="lang",type="c")$crosstab,caption="Nationalism Index",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@


<<echo=FALSE,results='asis'>>=
print(xtable(crosstab(svyz,row.vars="Knowledge",col.vars="lang",type="c")$crosstab,caption="Knowledge Index",digits=0),caption.placement = "top",floating=TRUE,table.placement = "h!")
@
\clearpage





\section{Regressions}





<<echo=FALSE,results='hide'>>=
mod1 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(AsylumEurope < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))
@

<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Favoring Decrease in Asylum Granted in Europe", caption.above = TRUE)
@




<<echo=FALSE,results='hide'>>=
mod1 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(AsylumHome < 0) ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism +
#            QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Favoring Decrease in Asylum Granted in Home Country", caption.above = TRUE)
@






<<echo=FALSE,results='hide'>>=
mod1 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(NAsySeekAccepted ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism +
#            QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "DV: Number of Asylum-Seekers Accepted in Conjoint (i.e. Rating Greater than or Equal to 5)", caption.above = TRUE)
@





<<echo=FALSE,results='hide'>>=
mod1 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + Nationalism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(NAsySeekRejected ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism + Nationalism +
#            QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "DV: Number of Asylum-Seekers Rejected in Conjoint (i.e. Rating Less than or Equal to 3)", caption.above = TRUE)
@




<<echo=FALSE,results='hide',eval=TRUE>>=
mod1 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(Schengen == 1) ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism +
#            QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis',eval=TRUE>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Favoring Reinstatement of Border Controls, for Schengen Countries", caption.above = TRUE)
@


<<echo=FALSE,results='hide'>>=
mod1 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed, data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight, data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude, data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism, data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism, data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism, data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(NonSchengen == 1) ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism +
#            QQnat2 + QQnat3 + QQnat4, data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Favoring Keeping Border Controls, for Non-Schengen Countries", caption.above = TRUE)
@



<<echo=FALSE,results='hide'>>=
mod1 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(Immigration < 0) ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#            FarLeft + Left + Right + FarRight +
#            Cosmo + EUAttitude + Altruism +
#            QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Favoring Decrease of Immigration into Home Country", caption.above = TRUE)
@



<<echo=FALSE,results='hide'>>=
# Generosity Index Regressions --------------------------------------------


mod1 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(AsyGenerosity ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + EUAttitude + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@



<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "DV: Index of Generosity toward Asylum-Seekers during Waiting Period (-22 to 22)", caption.above = TRUE)
@




<<echo=FALSE,results='hide'>>=
# Stipend Regressions --------------------------------------------


mod1 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(Stipend ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + EUAttitude + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@


<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "DV: Preference for Size of Stipend (1 to 6)", caption.above = TRUE)
@



<<echo=FALSE,results='hide'>>=
# International Allocation Method Regressions -----------------------------


mod1 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(SharePref== "3. proportional") ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@


<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Choosing a Proportional Allocation Method (i.e. Not First Entry and Not Same for All)", caption.above = TRUE)
@



<<echo=FALSE,results='hide'>>=
# International Matching Regressions -----------------------------

mod1 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + EUAttitude + Altruism + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(AssignPref == "3. matching") ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + EUAttitude + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@


<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Choosing Matching for Individual Assignment (i.e. Not First Entry and Not Random)", caption.above = TRUE)
@


<<echo=FALSE,results='hide'>>=
# Centralization Regressions ----------------------------------------------

mod1 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Empathy2 + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(AsyLocate == "1. centralization") ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + EUAttitude + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@

<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Wanting Asylum-Seekers Centralized within Country", caption.above = TRUE)
@



<<echo=FALSE,results='hide'>>=
# Harmonization Regressions ----------------------------------------------

mod1 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed + factor(lang), data=svyz)
coeftest(mod1, vcov = vcovHC(mod1, "HC3"))

mod2 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight + factor(lang), data=svyz)
coeftest(mod2, vcov = vcovHC(mod2, "HC3"))

mod3 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + factor(lang), data=svyz)
coeftest(mod3, vcov = vcovHC(mod3, "HC3"))

mod4 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod4, vcov = vcovHC(mod4, "HC3"))

mod5 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + Knowledge + EUAttitude + Empathy1 + Empathy2 + Altruism + factor(lang), data=svyz)
coeftest(mod5, vcov = vcovHC(mod5, "HC3"))

mod6 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
             #HSdegree + BAdegree + Graddegree + 
             IncomeDecile + Employed +
             FarLeft + Left + Right + FarRight +
             Cosmo + Nationalism + EUAttitude + factor(lang), data=svyz)
coeftest(mod6, vcov = vcovHC(mod6, "HC3"))

#mod7 <- lm(as.numeric(Harmonize == "1. national") ~ Female + Age + AgeSq + HomeBorn +
#             HSdegree + BAdegree + Graddegree + IncomeDecile + Employed +
#             FarLeft + Left + Right + FarRight +
#             Cosmo + EUAttitude + Altruism +
#             QQnat2 + QQnat3 + QQnat4 + factor(lang), data=svyz)
#coeftest(mod7, vcov = vcovHC(mod7, "HC3"))
@

<<echo=FALSE,results='asis'>>=
texreg(l=list(mod1,mod2,mod3,mod4,mod5,mod6),
       stars = c(0.001, 0.01, 0.05, 0.1), digits=3, symbol = "a",
       override.se = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,2],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,2],
                          coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,2],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,2],
                          coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,2],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,2]),
       override.pval = list(coeftest(mod1, vcov = vcovHC(mod1, "HC3"))[,4],coeftest(mod2, vcov = vcovHC(mod2, "HC3"))[,4],
                            coeftest(mod3, vcov = vcovHC(mod3, "HC3"))[,4],coeftest(mod4, vcov = vcovHC(mod4, "HC3"))[,4],
                            coeftest(mod5, vcov = vcovHC(mod5, "HC3"))[,4],coeftest(mod6, vcov = vcovHC(mod6, "HC3"))[,4]),
       caption = "Linear Probability Model - DV: Probability of Wanting Own National Asylum Guidelines", caption.above = TRUE)
@





\end{document}